package com.heima.search.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.search.dto.ApArticleSearchDto;
import com.heima.search.service.IAssociateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/associate")
public class AssociateController {

    @Autowired
    private IAssociateService associateService;

    //查询关联词
    @PostMapping("/search")
    public ResponseResult search(@RequestBody ApArticleSearchDto dto) {
        return associateService.searchAssociate(dto);
    }
}
